﻿using System.Configuration;

namespace CMS.Resources
{
	public static class AppConfig
	{
		public static string FtpHostNameBigImages { get { return ConfigurationManager.AppSettings["FtpHostNameBigImages"]; } }
		
		public static string FtpHostNameSmallImages { get { return ConfigurationManager.AppSettings["FtpHostNameSmallImages"]; } }
		
		public static string FtpUserName { get { return ConfigurationManager.AppSettings["FtpUserName"]; } }
		
		public static string FtpPassword { get { return ConfigurationManager.AppSettings["FtpPassword"]; } }
		
		public static string BigImagesFolderName { get { return ConfigurationManager.AppSettings["BigImagesFolderName"]; } }
		
		public static string SmallImagesFolderName { get { return ConfigurationManager.AppSettings["SmallImagesFolderName"]; } }
		
		public static int BigImageBoundWidth
		{
			get
			{
				var value = ConfigurationManager.AppSettings["BigImageBoundWidth"];
				int result;
				int.TryParse(value, out result);
				return result;
			}
		}
		
		public static int BigImageBoundHeight
		{
			get
			{
				var value = ConfigurationManager.AppSettings["BigImageBoundHeight"];
				int result;
				int.TryParse(value, out result);
				return result;
			}
		}
		
		public static int SmallImageBoundWidth
		{
			get
			{
				var value = ConfigurationManager.AppSettings["SmallImageBoundWidth"];
				int result;
				int.TryParse(value, out result);
				return result;
			}
		}
		
		public static int SmallImageBoundHeight
		{
			get
			{
				var value = ConfigurationManager.AppSettings["SmallImageBoundHeight"];
				int result;
				int.TryParse(value, out result);
				return result;
			}
		}
	}
}
